function showTaskUnsuperviseSearch() {
	window.location.href = "showTaskUnsuperviseSearch.do";
}

function ajaxFindTaskUnsuperviseSearchList(currentPage,pageSize) {
	$.ajax({
		type : "post",
		url : "ajaxTaskUnsuperviseSearchList.do",
		data : {
			currentPage:currentPage,
			pageSize:pageSize,
		},
		success : function(msg) {
			$("#listTaskUnsuperviseBox").html(msg);
		}
	});
}

function ajaxShowUnsuperviseInfoEdit(id){
	$.ajax({
		type:"post",
		url:"ajaxShowUnsuperviseInfoEidt.do",
		data:{unsuperviseInfoId:id},
		success:function(msg){
			$("#dialog").html(msg);
			$("#dialog").dialog({
				autoOpen: true,
				width: 540,
				title:$(".dialogtitle").attr("title"),
				modal: true,
				buttons: [
				          {
				        	  text: "保存",
				        	  click: function() {
				        		  ajaxSaveUnsuperviseInfo(this);
				        	  }
				          },
				          {
				        	  text: "关闭",
				        	  click: function() {
				        		  $(this).dialog( "close" );
				        	  }
				          }
				          ]
			});
		}
	});
}

function ajaxSaveUnsuperviseInfo(objDialog) {
	if ($("#frmUnsuperviseInfo").valid()) {
		$(objDialog).dialog("close");
		var options ={
				type: "post",
				url : "ajaxSaveUnsuperviseInfo.do",
				success: function (msg) {
					clearInput("#sltUnsuperviseInfo");
					showMessageDialog("保存撤控信息","撤控信息保存成功。",null,dialogType.info);
					ajaxFindUnsuperviseInfoSearchList();
				}
		};
		$("#frmUnsuperviseInfo").ajaxSubmit(options);
	}
}